Leaping iterative composition method of complicated graphic and storage medium having computer program executing the same

ABSTRACT

A leaping iterative composition method of a complicated graphic and a storage medium having a computer program executing the same are described. First, an initiator and generators are set. After several times of iterating, a transitional object is formed. Then, a leaping recursion is performed based on this transitional object. When performing the leaping recursion, a generator of each of the iterations is designed by a single pattern converted from a structural result of a previous iteration added with a base object. Since the result of each of the iterations keeps the original structure, the structure is used as the input initiator. The initiator of the first iteration can be a feature of different iteration objects. Since the input structure of iterations are the same, the advantage of reducing computing resources and avoid system overload are reachable.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates to a computer graphics method, and moreparticularly to a leaping iterative composition method of a complicatedgraphic applicable for generating a complicated object structure with asimple geometric object through iteration and generating the complicatedgraphic by use of leaping iteration of the object structure.

2. Related Art

Scenes in the nature change a lot and seem to have an unpredictablechange trend. For example, clouds in the sky, mountains rising andfalling, meandering running water, and even flowers, grasses and treesin daily life are widely different in shape and structure. Currently,the drawing of these scenes and objects mostly relies on hands or isperformed through drawing software such as Photoshop, Illustrator,AutoCAD, and Visio. The forming of a graphic both on a paper by handsand on a computer by the drawing software requires considerableoperation time. It is impossible for ordinary people to draw thesegraphics in an easy, rapid and precise way.

“Fractal geometry” is a geometric concept developed by the mathematicianBenoit Mandelbrot in 1970s. “Fractal” covers irregular line segments orgraphics. When studying a line segment and graphic composed of fractals,it is easy to find that detail constructions of the fractals have afeature of “self-similarity” despite of complicated and minutestructures and zigzag and meandering edges thereof The so-called“self-similarity” refers to a structure repeating feature with ascale-down in level. A quite complicated graphic structure can becomposed of smaller and smaller structures reproduced by such iteration.This “fractal” feature exists in scenes such as snowflake crystals andlightening in the sky. Due to an evolution and popularization ofcomputer technologies, currently, this “fractal” feature has beenapplied in the field of computer drawing for part of the artisticcreation. The repeatedly computing capability of a computer is used todraw natural landscapes in a life-like way or to draw a creation imagewith a complicated structure and resplendent colors. The user canconstruct mathematical models and several program instructions realizing“fractal” by use of software such as Matlab, Mathematica, and GSP, anddraw an “emulated picture” having a complicated but precise structurethrough a computer by executing these mathematical models or programinstructions.

However, the threshold of operating such kind of software is high, andthe composition rules of a graphic to be drawn must be analyzed beforedrawing the graphic. Moreover, when drawing the graphic, a relativelyfine graphic can be obtained only after tens (even hundreds) ofiterations of a basic geometric object, which is a considerableconsumption of computing resources of the computer. When a generalcomputer executes such kind of (fractal) drawing, the insufficientcomputing capability of the microprocessor often results in a prolongedtime for drawing a picture and even causes system down due to overloadof computer operation.

SUMMARY OF THE INVENTION

In view of the above problem that considerable computing resources of acomputer must be consumed when constructing a complicated graphic, thepresent invention is directed to a leaping iterative composition methodof a complicated graphic and a storage medium having a computer programexecuting the same. Multiple iteration objects are set on a structuralobject generated during iteration, and the generated structural objectis converted into a graphic file and duplicated to these iterationobjects. Then, the aforementioned actions of converting the structuralobject into the graphic file and iterating it to the iteration objectsare repeated. Therefore, the times of iteration operation can bereduced, thereby saving the computing resources of the computer andspeeding up the drawing.

As embodied and broadly described herein, the leaping iterativecomposition method of a complicated graphic is executed by a computer todraw a complicated graphic with a large amount of similar structures.The method includes (a) setting an initiator and a plurality ofgenerators, and setting a base object and a plurality of iterationobjects of the generators; (b) selecting any of the generators anditerating the selected generator to the initiator to generate atransitional object; (c) selecting any of the generators and iteratingthe selected generator to the transitional object, and repeating thestep for several times; (d) using the transitional object in the step(c) as a structural object and setting a plurality of iteration objectson the structural object; (e) converting the structural object in thestep (d) into a graphic and adding the base object to form a newgenerator, and iterating the generator to the iteration objects in thestructural object; and (f) repeatedly performing the step (e) andconverting the structural object after the iteration into thecomplicated graphic.

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, the step(a) further includes setting an object size and an object color of theinitiator and the generators.

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, the baseobject and the iteration objects can be one selected from among straightline segment, rectangle, circle, polygon, or irregular graphic.

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, thestructures of the initiator and the aforementioned generators can bestructures selected from a group consisting of line segment, rectangle,circle, polygon, and irregular graphic.

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, theaforementioned step (b) further includes adjusting a dimension of theselected generator according to a dimensional relationship between thebase object of the generator and the initiator, and iterating thegenerator to the initiator.

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, theselected generators in the step (c) are iterated to positions of theiteration objects on the transitional object.

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, themultiple iteration objects in the step (d) are set at the positions ofthe iteration objects of the transitional object in the aforementionedstep (d).

In the leaping iterative composition method of a complicated graphicaccording to a preferred embodiment of the present invention, the step(e) further includes adjusting a dimension of the graphic according todimensions of the iteration objects, and iterating the graphic to theiteration objects of the structural object.

In order to achieve another objective of the present invention, thepresent invention provides a storage medium having a computer programexecuting the aforementioned leaping iterative composition method of acomplicated graphic. This computer program can be read from the storagemedium and executed through an executable platform of a computer. Thecomputer program stored by the storage medium can also be attached toother drawing programs, browser programs or any application programsthat can open a graphic file, and can draw a complicated graphic byperforming various steps of the aforementioned leaping iterativecomposition method of a complicated graphic.

The computer program includes a human-machine interface for a user toset an object size, a shape and a color of the initiator, the generator,or a plurality of iteration objects on the structural object. The userselects the group of line segment, rectangle, circle, polygon, orirregular graphic to compose the above initiator and the generators bythe human-machine interface, and sets the base object line and aplurality of iteration objects on the generators. Both a relative angleand relative position for the iteration of the generator to theinitiator and a relative angle and relative position for the iterationof the generator to a transitional object can be adjusted through thishuman-machine interface. In addition, the user can also set repeatedlyperforming times of the step (f) of the aforementioned leaping iterativecomposition method of a complicated graphic, set a stop of theperforming of the step (f), or set a continue of the performing of thestep (f) through the human-machine interface.

In view of the above, the leaping iterative composition method of acomplicated graphic and the storage medium having the computer programexecuting the same of the present invention uses the transitional objectgenerated by the iteration as a new exponential generator and continuesthe iteration with this exponential generator, thereby reducing theiteration operation times, saving the computing resources of thecomputer, enhancing the drawing speed, and avoiding the phenomenon ofsystem down resulted from an overload operation.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will become more fully understood from thedetailed description given herein below for illustration only, and thusare not limitative of the present invention, and wherein:

FIG. 1 is a flow chart of a leaping iterative composition method of acomplicated graphic according to the present invention;

FIGS. 2A and 2B are schematic views of a human-machine interface of theleaping iterative composition method of a complicated graphic; and

FIGS. 3A to 3H are schematic views of a drawing process of thecomplicated graphic according to a preferred embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

The objectives and executing method thereof of the present invention areillustrated in detail in the following preferred embodiments, and theconcept of the present invention is also applicable to other scopes. Theembodiments described below are used for illustrating the objectives andexecuting method thereof of the present invention, instead of limitingthe scope of the same.

FIG. 1 is a method flow chart of a leaping iterative composition methodof a complicated graphic according to the present invention. Referringto FIG. 1, the leaping iterative composition method of a complicatedgraphic (the present composition method for short) is executed by acomputer or an electronic device platform with computing capability todraw a complicated graphic with a large amount of similar structures.Articles such as flowers, grasses and trees, snowflake structures, andshell patterns in the nature can be rapidly drawn by the presentcomposition method. In addition, artistic creations with a large amountof similar structures can also be rapidly drawn by the presentcomposition method.

The present composition method includes the following steps. First, aninitiator and a plurality of generators are set, and a base object and aplurality of iteration objects of the generators are set (step S110).

Next, one of the generators is selected and the selected generator isiterated to the initiator to generate a transitional object (step S120).One of the generators is selected and the selected generator is iteratedto the transitional object, and the step is repeated for several times(step S130). Then, the transitional object in the step S130 is used as astructural object and a plurality of iteration objects on the structuralobject are set (step S140). Afterward, the structural object in the stepS140 is converted into a graphic and the base object is add to form anew generator, and the generator is iterated to the iteration objects inthe structural object (step S150). Finally, the step S150 is repeatedlyperformed and the structural object after the iteration is convertedinto the complicated graphic (step S160).

The structure of the initiator and the generators is a structurecomposed of a group of line segment, rectangle, circle, polygon, andirregular graphic. The structure of the initiator and the generators arenot limited herein. A user can set an initial structure of the initiatoror the generators through a human-machine interface. For example, theinitiator is set to be a straight line segment. During an initializationof the initiator and the generators, i.e., the step S110, the user canalso set an object size and an object color of the initiator and thegenerators through the human-machine interface. Upon initializing theinitiator, the generators, the base object on various generators and theiteration objects and setting the times of iterating the generator tothe transitional object, a dimension of the generator is adjustedaccording to a dimensional and proportional relationship between thebase object on the generator and the initiator. The base object and theiteration object referred to herein may be a straight line segment, arectangle, a circle, a polygon, or an irregular graphic. Then, theadjusted generator is iterated to the initiator. In this embodiment, theadjusted generator is directly covered on the initiator. At this time,the image obtained is referred to as a transitional object.

In some embodiments, the user may rotate the initiator through thehuman-machine interface such that a relative angle is formed between thegenerator and the initiator, or move the generator through thehuman-machine interface in order to change a relative position of thegenerator to the initiator. In this way, subtle changes can be made tothe transitional object in a visual manner.

Subsequently, after the generator is iterated to the initiator, thegenerated transitional object inherits the plurality of iterationobjects on the original generator, i.e., uses the plurality iterationobjects of the original generator as its own iteration objects. In anext round of the iteration, the generator is iterated to the positionsof the iteration objects on the transitional object according to adimensional proportion between the iteration objects and the selectedgenerator. After iterating the generator to the iteration objects on thetransitional object in this way for several times, a transitional objectwith a relatively complicated structure is obtained. When iterating thegenerator to the transitional object continuously, the total number ofthe iteration objects on the transitional object exponentially grows.For example, after a two rounds of the iteration of a generatorcontaining 5 iteration objects, 25 iteration objects exist in theresulting transitional object, and after a three rounds of theiteration, 125 iteration objects exist. Drawing a complicated graphicwith this method causes an exponential growth of the iteration objectson the tip of the transitional object and thus a waste of computingresources for the iteration operation.

Accordingly, in the present invention, after generating the transitionalobject (or iterating the generator to the transitional object forseveral times), the transitional object is further used as thestructural object, and a plurality of iteration objects of thestructural object are set with the positions of the iteration objects onthe transitional object.

Then, the structural object is converted into a graphic and the baseobject is added to form a new generator. And then, the new generator isiterated to the iteration objects in the structural object. During theiteration, after adjusting the dimension of the aforementionedgenerator, i.e., the new generator formed by the graphic converted fromthe structural object added with the base object according to dimensionsof the iteration objects, the generator is iterated back to theiteration objects on the structural object.

The user can also adjust a relative angle and relative position for theiteration of the new generator to the iteration objects of thestructural object through a human-machine interface, i.e., after theiteration of the aforementioned new generators to the correspondingpositions of the structural object, rotate or slightly move the newgenerators substituted into the structural object. Similarly, the usercan also adjust a color, size and shape (such as a rectangle ortrapezoid) of the iteration objects on the structural object through thehuman-machine interface. In addition, in some other embodiments, thehuman-machine interface is further provided for the user to setrepeatedly performing times of the aforementioned step S150, set a stopof the performing of the step S150, or set a continue of the performingof the step S150.

It is to be noted that, since the number of the iteration objects on thestructural object is constant, the operation amount of converting thestructural object into a graphic and iterating it back to the iterationobjects of the structural object is fixed each time. When a complicatedgraphic is drawn not using the composition method of a frame structure,the operation amount grows exponentially, while the operation amount ismaintained at a constant when the frame structure is used to perform theiteration. It can be seen that the present invention does reduce theoperation amount of the iteration.

To clarify the present composition method, a preferred embodiment isused to illustrate a process of drawing a complicated graphic by thepresent composition method. In this preferred embodiment, a storagemedium (such as a hard disk, a soft disk or a magnetic disk drive) has acomputer program stored therein which can execute the presentcomposition method. After being read from the storage medium, thiscomputer program is loaded to be attached to the well-known Power Pointsoftware to be executed. The computer program may also be loaded orinstalled in other drawing programs (such as Photoshop image editingsoftware), browser programs (such as IE web browser), or any applicationprograms which can open a graphic file (such as the little artist), soas to execute the present composition method to draw the complicatedgraphic. The presentation mode of the computer program is not limitedherein.

FIGS. 2A and 2B are schematic views of a human-machine interface of theleaping iterative composition method of a complicated graphic. Referringto FIGS. 2A and 2B sequentially, the user sets a shape, color, andobject dimension of the initiator and the generator by the human-machineinterface in the FIG. 2A. The user may use the mouse to click the upperfunction menu to select a function to be executed to perform thedrawing, or use the hot key to call a required drawing function. Thetree with dense branches and leaves in FIG. 2B is the complicatedgraphic drawn by use of the aforementioned computer program. The treewhich seems complicated in fact is composed of dots, line segments,rectangles, circles, polygons, and irregular graphics. The user onlyneeds to select the basic shapes (such as the aforementioned dots, linesegments, rectangles, circles, polygons, and irregular graphics)composing the initiator and the generator, and adjust bending angles ofthe branches and leaves visually to complete a life-like tree.

FIGS. 3A to 3H are schematic views of a drawing process of thecomplicated graphic according to a preferred embodiment of the presentinvention. First referring to FIG. 3A, the user selects generatorsinitialized as a generator 310 c to be substituted into an initiator 320and sets a base object line 316 a and a plurality of iteration lines 311a to 315 a on the generators with the aforementioned man-machineinterface. Referring to FIG. 3B, first, the generator 310 c is iteratedto the initiator 320. The default iteration mode is to adjust thegenerator 310 c according to a dimensional relationship between the baseobject 316 a, for example, a dashed line segment in this embodiment inthe generator 310 c and the initiator 320, and to iterate the generator310 c on the initiator 320 (as the schematic graphic in the solid circleof FIG. 3B) to form a transitional object 330 (as shown in the lowerhalf graphic of FIG. 3B). The user may further set a relative angle andposition of the generator 310 a to the initiator 320 during theiteration through the human-machine interface.

Then referring to FIG. 3C, the object structure after the iteration isreferred to as the transitional object 330. After generating thistransitional object 330, the generator 310 c is again iterated back tothe iteration objects of the transitional object 330, i.e., the thinstraight line segments in the transitional object 330 in the upper halfof FIG. 3B. The system, i.e., the computer program, automaticallyadjusts a dimension of the exponential generator 310 c according to alength of the iteration objects. In some embodiments, other generators,for example, the generators 310 a, 310 b, or 310 d may also be selectedto be iterated to the transitional object 330. In this embodiment, thegenerator 310 c is still selected to perform the iteration. It is foundfrom this figure that a considerable amount of iteration objects (thinline segments) have already existed in the tip of the tree structure. Atthis time, a generator 340 a is formed, as shown in FIG. 3D. The system(or the compute program) uses the generator 340 a to set a plurality ofiteration objects 342 on this structural object 340 as shown in FIG. 3D.The iteration objects 342 in FIG. 3D are set at the positions of themultiple iteration objects, for example, the thin line segments in thetree tip on the transitional object 330 as shown in FIG. 3D.

Referring to FIG. 3D again, the structural object 340 is converted intoa graphic and a frame as a base object is added so as to form a newgenerator 350. Then, the new generator 350 is iterated back to each ofthe iteration objects of the structural object 340 shown in FIG. 3D. Thetransitional object 340 as shown in FIG. 3E can be generated after theiteration. At this time, if the iteration is to be performed again, thetransitional object 340 in FIG. 3E is converted into a graphic and thebase object is added again to form the new generator 350, which is theniterated to the structural object 340 shown in FIG. 3E to generate a newtransitional object 340 as shown in FIG. 3F The transitional object 340in FIG. 3F is then again converted into a graphic and the base object isadded again to form the new generator 350, which is then iterated to thestructural object 340 shown in FIG. 3F to generate a new transitionalobject 340 as shown in FIG. 3G The same process is performed again togenerate a complicated graphic 360 as shown in FIG. 3H. This process mayrequire less memory and operate easily. Alternatively, the generator 350in FIG. 3E may be iterated to the structural object 340 shown in FIG.3D. Similarly, the generator 350 in FIG. 3F, may be iterated to thestructural object 340 shown in FIG. 3D the generator 350 in FIG. 3G maybe iterated to the structural object 340 shown in FIG. 3D, or 3E. Theiteration objects 342 of the aforementioned structural object 340 maybe, for example, line segments, frames, rectangles, polygons, orcircles. The outline of the iteration objects is not limited herein. Inaddition, some of the iteration objects 342 may be colored instead ofthe blank frame as in FIG. 3D. Some of the iteration objects 342 in FIG.3E to FIG. 3G may also be colored as well. In FIG. 3E to FIG. 3G, it isnoted that the transitional object 340 have the same structure as thetransitional object 340 shown in FIG. 3D. Using different generators toperform iteration result in the different appearance in those figures.

Till now, the tree drawn by the system (the computer program) has beenquite dense. During the drawing process, if the branches and leaves ofthe tree are not dense enough in the user's opinion, the user canfurther set a continue of the performing of the aforementioned iteratingsteps, i.e., after setting the resulting iterated result to be agraphic, iterate it back to each of the iteration objects of thestructural object again. If the user thinks the interleaving degree ofthe branches and leaves of the tree is enough, he/she may stop theperforming of the iterating steps by issuing a Stop command. The usermay also set the iteration times so that the system (the computerprogram) automatically stops the iteration action after completing theset iteration times and outputs a completed complicated graphic (thecomplicated graphic described in this embodiment is a tree with densebranches and leaves).

In view of the above, during the drawing of a complicated graphic with alarge amount of similar structures in the present invention, the system(the computer program) uses the result after several times of iteratingas the structural object, uses the positions of the iteration objects asthe iteration objects on the structural object, and iterates thestructural object back to the iteration objects on the structural objectby iteratively converting the structural object into a graphic to obtaina relatively fine and complicated picture. Since the number of theiteration objects on the structural object is fixed, the operationamount of each of the iterations is equal. Therefore, the presentinvention at least has the following advantages.

1. The times of required iteration is greatly reduced and the computingresources of the computer for drawing the complicated graphic are saved.

2. The speed of drawing the complicated graphic is enhanced.

3. The former phenomenon of instability or down of the computer systemresulted from overload operation when drawing the complicated graphicare alleviated.

1. A leaping iterative composition method of a complicated graphic,executed by a computer to draw a complicated graphic with a large amountof similar structures, the method comprising: (a) setting an initiatorand a plurality of generators, and setting a base object and a pluralityof iteration objects of the generator; (b) selecting any of thegenerators and iterating the selected generator to the initiator togenerate a transitional object; (c) selecting any of the generators anditerating the selected generator to the transitional object, andrepeating the step for several times; (d) using the transitional objectin the step (c) as a structural object and setting a plurality ofiteration objects on the structural object; (e) converting thestructural object in the step (d) into a graphic and adding the baseobject to form a new generator, and iterating the new generator to theiteration objects in the structural object executed by the computer; and(f) performing the step (e) repeatedly and converting the structuralobject after the iteration into the complicated graphic.
 2. The leapingiterative composition method of a complicated graphic as claimed inclaim 1, wherein the step (a) further comprises setting an object sizeand an object color of the initiator and the generators.
 3. The leapingiterative composition method of a complicated graphic as claimed inclaim 1, wherein the base object and the iteration objects are selectedfrom a group consisting of straight line segment, rectangle, circle,polygon, and irregular graphic.
 4. The leaping iterative compositionmethod of a complicated graphic as claimed in claim 1, wherein thestructures of the initiator and the generators are structures selectedfrom a group consisting of line segment, rectangle, circle, polygon, andirregular graphic.
 5. The leaping iterative composition method of acomplicated graphic as claimed in claim 1, wherein the step (b) furthercomprises adjusting the selected generator according to a dimensionalrelationship between the base object of the generator and the initiator,and iterating the generator to the initiator.
 6. The leaping iterativecomposition method of a complicated graphic as claimed in claim 1,wherein the selected generators in the step (c) are iterated topositions of the iteration objects of the transitional object.
 7. Theleaping iterative composition method of a complicated graphic as claimedin claim 1, wherein the iteration objects in the step (d) are set at thepositions of the iteration objects of the transitional object.
 8. Theleaping iterative composition method of a complicated graphic as claimedin claim 1, wherein the step (e) further comprises adjusting a dimensionof the graphic according to the dimensions of the iteration objects anditerating the graphic to the iteration objects of the structural object.